//
//  ToolMethods.h
//  KiWiPeniOSProject
//
//  Created by 曾威林 on 2017/8/18.
//  Copyright © 2017年 zjy. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface ToolMethods : NSObject

+ (NSString *)generateRandomNumbers;//生成八位随机数
+ (long long)generateTimestamp;//生成时间戳
+ (void)saveMobileTokenWithMobileToken:(NSString *)mobileToken;//保存mobiletoken
+ (void)saveAccessTokenWithAccessToken:(NSString *)accessToken;//保存accesstoken
+ (NSString *)getMobileToken;//获取mobiletoken
+ (NSString *)getAccessToken;//获取accesstoken


+ (void)showTextOnly:(NSString*)text;//在屏幕停留一秒的提示框（toast)
+ (BOOL)judgeIfIsRightMobileNumberWithMobileNumber:(NSString *)mobileNumber;//判断是不是正确的手机号
//获取当前的导航控制器
+ (UINavigationController *) getRootNavigationController;
//替换当前页面
+ (void) replaceCurrentVCWithVC:(UIViewController *) newVC;
+ (UIViewController *) getCurrentVC;
//获取当前屏幕中present出来的viewcontroller
+ (UIViewController *)getPresentedViewController;
//异或操作
+ (Byte) xorByteA:(Byte) a AndByteB:(Byte) b;
+ (Byte) xorsBytes:(Byte) byte, ...NS_REQUIRES_NIL_TERMINATION;
//给音频文件加头
+ (NSData *) addHeaderSign:(NSData *) fileData;
@end
